home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Chef 1.1 so Folder / Chef ƒ / Chef code ƒ / chef error.c next >
Encoding:
C/C++ Source or Header  |  1994-01-27  |  1.5 KB  |  54 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        chef error.c
  4.  
  5. Purpose:    This module handles fatal and non-fatal Chef-specific
  6.             errors.
  7.  
  8.  
  9. Chef -=- convert text to Swedish chef talk
  10. Copyright ©1994, Mark Pilgrim
  11.  
  12. This program is free software; you can redistribute it and/or modify
  13. it under the terms of the GNU General Public License as published by
  14. the Free Software Foundation; either version 2 of the License, or
  15. (at your option) any later version.
  16.  
  17. This program is distributed in the hope that it will be useful,
  18. but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20. GNU General Public License for more details.
  21.  
  22. You should have received a copy of the GNU General Public License
  23. along with this program in a file named "GNU General Public License".
  24. If not, write to the Free Software Foundation, 675 Mass Ave,
  25. Cambridge, MA 02139, USA.
  26.  
  27. \**********************************************************************/
  28.  
  29. #include "program globals.h"
  30. #include "chef error.h"
  31. #include "chef progress.h"
  32. #include "msg dialogs.h"
  33. #include "msg main.h"
  34. #include "msg environment.h"
  35.  
  36. void HandleError(int resultCode)
  37. {
  38.     Str255            tempStr;
  39.     
  40.     if (resultCode!=allsWell)
  41.     {
  42.         if (showThatTharProgress)
  43.         {
  44.             DismissProgressDialog();
  45.             gInProgress=FALSE;
  46.         }
  47.         
  48.         GetIndString(tempStr, 129, resultCode);
  49.         ParamText(tempStr, "\p", "\p", "\p");
  50.         PositionDialog('ALRT', prefsErrorAlert);
  51.         StopAlert(prefsErrorAlert, 0L);
  52.     }
  53. }
  54.